Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore model from config and weights for model training #9

Merged
merged 8 commits into from
Mar 14, 2023

Conversation

IsraelAbebe
Copy link
Contributor

@IsraelAbebe IsraelAbebe commented Mar 14, 2023

  • Added cli argument
  • Reformatted code to create directories earlier so we would search for them
  • Reading config and model weights
  • Error handling if config or weights don't exist
  • Tested locally

closes #7

Please check and let me know if I should improve anything or if there are other tests I should run.

@nicolafan
Copy link
Owner

Firstly thank you for this PR!

I think adding a try-except block for reading the files is a good idea. We can change the utility function I made for building the model to make it raise an exception if there are problems in accessing the files, so that the except block can be triggered and show the error message.

Since this project uses the cookie-cutter data science template, error-info messages should be showed using a logger, that can be obtained with logger = logging.getLogger(__name__), after setting up the logger in the if __name__ == "__main__" block (an example can be seen in make_dataset.py.

@nicolafan
Copy link
Owner

Perfect, I made these little changes and we are ready to go!

@nicolafan
Copy link
Owner

Thank you for this PR @IsraelAbebe !

@nicolafan nicolafan merged commit d59c065 into nicolafan:main Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore model from config and weights for model training, via CLI option
2 participants